<!--created by Chuanpeng.zhu@dhc.com.cn-->
<ion-view view-title="过滤器">
  <ion-content>
    <div class="padding">
      <div class="margin-bottom-10">在我们开发中，经常需要将给用户的信息进行一定的<b>格式化处理</b>后再显示，下面是几种常用的过滤器。ps:*代表重要哦！！！</div>
      <div class="padding-10 bg-background">**时间过滤器（expression | date）</div>
      <div class="padding-top-bottom-10 border-bottom">默认时间：<span ng-bind="time"></span></div>
      <div class="padding-top-bottom-10 border-bottom">格式化时间：<span ng-bind="time | date:'yyyy-MM-dd HH:mm:ss'"></span>
      </div>
      <div class="padding-top-bottom-10">格式化日期：<span ng-bind="time | date:'yyyy-MM-dd'"></span></div>

      <div class="padding-10 bg-background">**货币过滤器（expression | currency）</div>
      <div class="padding-top-bottom-10 border-bottom">默认货币：<span ng-bind="currency|currency"></span></div>
      <div class="padding-top-bottom-10">人民币货币：<span ng-bind="currency|currency : '￥'"></span></div>

      <div class="padding-10 bg-background">*长度过滤器（expression | limitTo）</div>
      <div class="padding-top-bottom-10 border-bottom">电话号：<span ng-bind="telephone"></span></div>
      <div class="padding-top-bottom-10 border-bottom">电话号后四位：<span ng-bind="telephone|limitTo:-4"></span></div>
      <div class="padding-top-bottom-10">电话号前三位：<span ng-bind="telephone|limitTo:3"></span></div>

      <div class="padding-10 bg-background">大小写过滤器（expression | lowercase or expression | uppercase）</div>
      <div class="padding-top-bottom-10 border-bottom">默认字符串：<span ng-bind="letter"></span></div>
      <div class="padding-top-bottom-10 border-bottom">大写转小写：<span ng-bind="letter|lowercase"></span></div>
      <div class="padding-top-bottom-10">小写转大写：<span ng-bind="letter|lowercase|uppercase"></span></div>

      <div class="padding-10 bg-background">*小数过滤器（expression | number）</div>
      <div class="padding-top-bottom-10 border-bottom">默认数字：<span ng-bind="number"></span></div>
      <div class="padding-top-bottom-10 border-bottom">二位小数：<span ng-bind="number|number:2"></span></div>
      <div class="padding-top-bottom-10">整数：<span ng-bind="number|number:0"></span></div>

      <div class="padding-10 bg-background">json过滤器（expression | json）</div>
      <div class="padding-top-bottom-10 border-bottom">默认json：<span ng-bind="jsonData"></span></div>
      <div class="padding-top-bottom-10">格式化json：<span ng-bind="jsonData|json"></span></div>

      <div class="padding-10 bg-background">*排序过滤器（expression | orderBy）</div>
      <div class="padding-top-bottom-10 border-bottom">
        默认顺序：
        <div ng-repeat="item in data">
          <span ng-bind="item.name"></span>
          <span ng-bind="item.age"></span>
        </div>
      </div>
      <div class="padding-top-bottom-10 border-bottom">
        按年龄正序：
        <div ng-repeat="item in data|orderBy:'age'">
          <span ng-bind="item.name"></span>
          <span ng-bind="item.age"></span>
        </div>
      </div>
      <div class="padding-top-bottom-10">
        按名字倒序：
        <div ng-repeat="item in data|orderBy:'-name'">
          <span ng-bind="item.name"></span>
          <span ng-bind="item.age"></span>
        </div>
      </div>

      <div class="padding-10 bg-background">匹配过滤器（expression | filter）</div>
      <div class="padding-top-bottom-10 border-bottom">
        找出带4的：
        <div ng-repeat="item in data|filter:4">
          <span ng-bind="item.name"></span>
          <span ng-bind="item.age"></span>
        </div>
      </div>
      <div class="padding-top-bottom-10">
        找出名字里带z的：
        <div ng-repeat="item in data|filter:{name:'z'}">
          <span ng-bind="item.name"></span>
          <span ng-bind="item.age"></span>
        </div>
      </div>
    </div>
  </ion-content>
</ion-view>
